﻿@model Unijovem.UI.Models.PregacaoModel

@{
    ViewBag.Title = "Manter";
}

<h2>Manter</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>PregacaoModel</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.IdEvento)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IdEvento)
            @Html.ValidationMessageFor(model => model.IdEvento)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.UrlYoutube)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.UrlYoutube)
            @Html.ValidationMessageFor(model => model.UrlYoutube)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Titulo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Titulo)
            @Html.ValidationMessageFor(model => model.Titulo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Ordem)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Ordem)
            @Html.ValidationMessageFor(model => model.Ordem)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IdAutor)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.IdAutor, (SelectList)ViewBag.Autores)<br />
            @Html.ValidationMessageFor(model => model.IdAutor)
        </div>

        @if (Model != null && Model.Id != 0)
        {
            @Html.HiddenFor(model => model.Id)
        }

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
